<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../../common/taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>卡片类别管理</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<link href="${ctx }/css/style.css" type="text/css" rel="stylesheet" />
		<script type="text/javascript" src="${ctx }/js/jquery/jquery-1.6.1.min.js"></script>
		<script type="text/javascript">
			$(function() {
				$("#btnAddType").click(function() {
					$("form:first").submit();
				});

				$("#btnDeleteType").click(function() {
					var form = $("form:first");
					form.attr("action", "${ctx}/cardType/deleteCardType.action");
					form.submit();

					form.attr("action", "${ctx}/cardType/createCardType.action");
				});
			});
		</script>
	</head>

	<body>
		<s:form action="createCardType" method="post" namespace="/cardType" enctype="multipart/form-data">
			<div>
				<div style="width: 99%; height: 30px; text-align: left;">
					当前位置：卡片类别管理
				</div>
				<div style="width: 99%; height: 110px; text-align: left;">
					<img src="${ctx }/images/card.gif" style="border: 0" alt="" />
				</div>
				<div
					style="width: 99%; background-color: #EDDEA0; height: 30px; border: 1px solid gray;">
					<b>卡 片 类 别 管 理</b>
				</div>

				<div style="width: 99%; background-color: #E8F9E8; text-align: left; height: 30px;">
					<div style="float: left; width: 28%; height: 30px;">
						<span style="color: blue; width: 175px;">请输入物品类别名称：</span>
					</div>
					<div style="float: left; width: 60%; height: 30px;">
						<s:textfield name="cardType.typeName"></s:textfield>
						&nbsp;&nbsp;
					</div>
					<br />
				</div>

				<div style="width: 99%; background-color: #E8F9E8; text-align: left; height: 30px;">
					<div style="float: left; width: 28%; height: 30px;">
						<span style="color: blue; width: 175px;">选择图片路径：</span>
					</div>
					<div style="float: left; width: 60%; height: 30px; padding-top: 3px">
						<s:file name="file" cssStyle="width: 228px;"></s:file>
					</div>
				</div>

				<div style="width: 99%; background-color: #E8F9E8; text-align: left; height: 30px;">
					<div style="float: left; width: 28%; height: 30px;">
						<span style="color: blue; width: 175px;">商品价格(元)：</span>
					</div>
					<div style="float: left; width: 60%; height: 30px;">
						<s:select list="#{30:30,50:50,100:100,200:200,500:500,1000:1000}" name="cardType.price" cssStyle="width: 88px;"></s:select>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
						<input type="button" id="btnAddType" value="添加新类型" style="cursor: hand; width: 91px;" />
					</div>
				</div>
				<br />
				<div style="width: 99%; background-color: #E8F9E8; text-align: left; height: 197px;">
					<div style="float: left; width: 28%; height: 197px;">
						<span style="color: blue; width: 182px;">选择图片路径：</span>
					</div>
					<div style="float: left; width: 60%; height: 197px;">
						<s:select list="types" id="cardTypeId" name="id" cssClass="InputCss" cssStyle="height:198px; width:153px;" size="4"
							listKey="id" listValue="%{typeName + '-' + price.intValue() + '元'}"></s:select>
						&nbsp;&nbsp;
						<input type="button" id="btnDeleteType" value="删除选中类型" style="width: 92px; cursor: hand;" />
					</div>
				</div>
			</div>
		</s:form>
	</body>
</html>
